if (app)
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
else
- icon = textureCache.bind_cairo_surface_property(windows[i], 'icon');
+ icon = textureCache.bind_cairo_surface_property(windows[i],
+ 'icon',
+ POPUP_APPICON_SIZE);
}
items.push({ name: windows[i].title,
actor = st_texture_cache_bind_cairo_surface_property (st_texture_cache_get_default (),
G_OBJECT (window),
- "icon");
- g_object_set (actor, "width", (float) size, "height", (float) size, NULL);
+ "icon",
+ size);
return actor;
}
typedef struct {
StTextureCache *cache;
ClutterActor *actor;
+ gint size;
GObject *source;
guint notify_signal_id;
gboolean weakref_active;
image = clutter_actor_get_content (bind->actor);
if (!image || !CLUTTER_IS_IMAGE (image))
- image = clutter_image_new ();
+ image = st_image_content_new_with_preferred_size (bind->size, bind->size);
else
g_object_ref (image);
ClutterActor *
st_texture_cache_bind_cairo_surface_property (StTextureCache *cache,
GObject *object,
- const char *property_name)
+ const char *property_name,
+ gint size)
{
ClutterActor *actor;
gchar *notify_key;
StTextureCachePropertyBind *bind;
- actor = clutter_actor_new ();
+ actor = create_invisible_actor ();
+ clutter_actor_set_size (actor, size, size);
bind = g_new0 (StTextureCachePropertyBind, 1);
bind->cache = cache;
bind->actor = actor;
+ bind->size = size;
bind->source = object;
g_object_weak_ref (G_OBJECT (actor), st_texture_cache_bind_weak_notify, bind);
bind->weakref_active = TRUE;
ClutterActor *st_texture_cache_bind_cairo_surface_property (StTextureCache *cache,
GObject *object,
- const char *property_name);
+ const char *property_name,
+ gint size);
ClutterActor *st_texture_cache_load_gicon (StTextureCache *cache,
StThemeNode *theme_node,